﻿<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl" %>
<script type="text/javascript" src="http://vnexpress.net/Service/Forex_Content.js"></script> 
<script type="text/javascript" src="http://vnexpress.net/Service/Gold_Content.js"></script>
<script type="text/javascript">

    $(function() {
        for (i = 0; i <= 8; i++) {
            ////        $(".currency").append("<li style='font-weight:bold;'>&nbsp; " + vForexs[i] + " : <span style='color:#C71212'>" + vCosts[i] + " VNĐ</span> </li>")
            $(".pad1 .tbl_tt").append("<tr style='width:40%;text-align:center'><td>" + vForexs[i] + "</td><td>" + vCosts[i] + " VNĐ</td></tr>")
        }
        $(".pad .tbl_tt").append("<tr style='width:40%;text-align:center'><td>Sjc</td><td>" + vGoldSjcBuy + "</td><td>" + vGoldSjcSell + "</td></tr>")
        $(".pad .tbl_tt").append("<tr style='width:40%;text-align:center'><td>Sbj</td><td>" + vGoldSbjBuy + "</td><td>" + vGoldSbjSell + "</td></tr>")
        $(".pad1").css("display", "none");
        $(".tg ul li a").click(function() {
            $(".tg ul li a").removeClass("act");
            $(this).addClass("act");
            if ($(this).html() == "Ngoại tệ") {
                $(".pad").css("display", "none");
                $(".pad1").css("display", "block");
                $(".pad2").css("display", "none");
            } else if ($(this).html() == "Chứng khoán") {
            $(".pad").css("display", "none");
            $(".pad1").css("display", "none");
            $(".pad2").css("display", "block");
        } else if ($(this).html() == "Giá vàng") {
            $(".pad").css("display", "block");
            $(".pad1").css("display", "none");
            $(".pad2").css("display", "none");
        }
            return false;
        });
    })    
</script>
<div class="box_tg">
	<div class="box_tg_tit">
    	<div class="tg">
        	<ul>
            	<li><a href="#" class="act">Giá vàng</a></li>
                <li><a href="#">Ngoại tệ</a></li>
                <li><a href="#">Chứng khoán</a></li>
            </ul>
        </div>
        <div class="clear"></div>
        <div class="pad">
    	<table width="100%" border="0" cellpadding="0" cellspacing="0" class="tbl_tt">
          <tr style="width:30%" align="center">
            <td colspan="3" class="tigia">Cập nhật lúc: <%=DateTime.Now.Hour %>: <%=DateTime.Now.Minute %>: <%=DateTime.Now.Second %> <%=DateTime.Now.ToString("tt") %> <%=string.Format("{0:dd/MM/yyy}",DateTime.Now) %></td>
          </tr>
          <tr style="width:30%" align="center">
            <td><strong>Loại</strong></td>
            <td><strong>Mua</strong></td>
            <td><strong>Bán</strong></td>
          </tr>          
        </table>
        <div class="f_right">( Nguồn: <span class="t_blue">VnExpress.net</span> )</div>
        <div class="clear"></div>
   	 </div>
   	 <div class="pad1 mar_t">
    	<table width="100%" border="0" cellpadding="0" cellspacing="0" class="tbl_tt">
          <tr style="width:30%" align="center">
            <td colspan="3" class="tigia">Cập nhật lúc: <%=DateTime.Now.Hour %>: <%=DateTime.Now.Minute %>: <%=DateTime.Now.Second %> <%=DateTime.Now.ToString("tt") %> <%=string.Format("{0:dd/MM/yyy}",DateTime.Now) %></td>
          </tr>
          <tr style="width:30%" align="center">
            <td><strong>Loại tiền tệ</strong></td>
            <td><strong>Mua</strong></td>            
          </tr>          
        </table>
        <div class="f_right">( Nguồn: <span class="t_blue">VnExpress.net</span> )</div>
        <div class="clear"></div>
   	 </div>
    </div>
</div>
